<?php
session_start();
include_once('includes/general.php');
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Health Advisor</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="iecss.css" />
<![endif]-->
<script src="js/jquery-1.8.0.min.js"></script>
</head>
<body>
<div id="main_container">
  <div class="header">
    <div id="logo"><a href="#"><img src="images/logo.png" alt="" width="162" height="54" border="0" /></a></div>
    <div class="right_header">
      <div class="top_menu" id="top_menu"> 
	  <?php
	  if (isset($_SESSION['user']))
	  {
	  ?>
		<a href="#" class="login"><?php echo $_SESSION["user"]; ?></a> <a href="logout.php" class="sign_up">Đăng xuất</a> 
	  <?php
	  }
	  else
	  {
	  ?>
		<a href="index.php?p=login" class="login">Đăng nhập</a> <a href="index.php?p=signup" class="sign_up">Đăng ký</a> 
	  <?php
	  }
	  ?>
	  </div>
      <div id="menu">
        <ul>
          <li><a class="current" href="index.html">Trang Chủ</a></li>
          <li><a href="#">Kiến Thức</a></li>
          <li><a href="#">Tư Vấn</a></li>
          <li><a href="#">Liên Hệ</a></li>
        </ul>
      </div>
    </div>
  </div>
  
  <?php
  if (isset($_GET['p']))
  {
	$page = $_GET['p'];
	switch ($page)
	{
		case 'index': 
					include_once('pages/p_index.php');
					break;
		case 'signup':
					include_once('pages/p_signup.php');
					break;
		case 'login':
					include_once('pages/p_login.php');
					break;
		case 'subject':
					include_once('pages/p_subject.php');
					break;
		default:
					include_once('pages/p_index.php');
					break;
	}
  }
  else include_once('pages/p_index.php');
  ?>
  
  <div id="footer">
    <div class="copyright"> <img src="images/footer_logo.gif" alt="" /> </div>
    <div class="center_footer">&copy; Medical Clinic 2008. All Rights Reserved</div>
    <div class="footer_links"> <a href="http://csstemplatesmarket.com"><img src="images/csstemplatesmarket.gif" alt="" border="0" /></a> </div>
  </div>
</div>
</body>
</html>
